import { formatDate } from "@/utils/formatTime"

export const useSearchForm = [
  {
    field: 'name',
    label: '配置名称',
    component: 'Input',
  },
  {
    field: 'id',
    label: 'ID',
    component: 'Input',
  },
]

export const columns = [
  {
    prop: 'id',
    label: 'ID',
    align: 'center',
  },
  {
    prop: 'name',
    label: '配置名称',
    align: 'center',
  },
  {
    prop: 'property',
    label: '配置值',
    align: 'center',
  },
  {
    prop: 'createTime',
    label: '创建时间',
    align: 'center',
    formatter: (row: any) => {
      return formatDate(row.createTime, 'YYYY-MM-DD HH:mm:ss')
    }
  },
]

export const actionColumn = {
  width: 200,
  align: 'center',
  label: '操作',
  prop: 'actions',
  fixed: 'right',
}